package com.cet.designpatterns.singleton.type1;

/**
 * @program: algorithm
 * @description: 经典饿汉式单例
 * @author: 陈恩涛
 * @create: 2021-08-30 22:57
 **/
public class SingletonTest01 {
    public static void main(String[] args) {
        Singleton instance = Singleton.getInstance();
        Singleton instance1 = Singleton.getInstance();
        System.out.println("instance.hashCode="+instance.hashCode());
        System.out.println("instance1.hashCode="+instance1.hashCode());
    }
}

